/**
 * Created by win7 on 2017/3/11.
 */
import Relay from "react-relay";

    export default class FindPersonnelListMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { findPersonnelList }`;
    }

    getVariables() {
        return {
            argsInput: {
                enterpriseId:this.props.enterpriseId,
                depId:this.props.rid,
                pageSize: this.props.pageSize,
                pageNum: this.props.pageNum,
                status:this.props.status
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on findPersonnelListPayload {
            findPersonnelList {
                errorCode
                value
                totalResult
                userModelList{
                    depName
                    name
                    roleName
                    email
                    phone
                    uid
                    status
                    roleId
                }
                id
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on findPersonnelListPayload {
                    findPersonnelList {
                        errorCode
                        value
                        totalResult
                        userModelList{
                            depName
                            name
                            roleName
                            email
                            phone
                            uid
                            status
                            roleId
                        }
                        id
                    }
                }
            `]
        }];
    }

}